import request from '@/utils/request'

export function getdepart() {
  return request({
    url: '/department/getdepart',
    method: 'post'
  })
}

export function getdepart2() {
  return request({
    url: '/department/getdepart2',
    method: 'post'
  })
}
export function getdepartlist() {
  return request({
    url: '/department/getdepartlist',
    method: 'get'
  })
}
export function adddpart(data) {
  return request({
    url: '/department/adddpart',
    method: 'post',
    data
  })
}

export function getparentName(id) {
  return request({
    url: '/department/getparentName',
    method: 'post',
    params: { id }
  })
}

export function editdpart(data) {
  return request({
    url: '/department/editdpart',
    method: 'post',
    data
  })
}

export function start(id) {
  return request({
    url: '/department/start',
    method: 'post',
    params: { id }
  })
}

export function getchirldnum(id) {
  return request({
    url: '/department/getchirldnum',
    method: 'post',
    params: { id }
  })
}

export function getdeUsernum(id) {
  return request({
    url: '/department/getdeUsernum',
    method: 'post',
    params: { id }
  })
}
export function end(id) {
  return request({
    url: '/department/end',
    method: 'post',
    params: { id }
  })
}
export function cascade(id) {
  return request({
    url: '/department/getid',
    method: 'post',
    params: { id }
  })
}
